import wx

class Example(wx.Frame):
    def __init__(self, parent, title):
        super(Example, self).__init__(parent, title=title)
        self.InitUI()
    def InitUI(self):
        wx.StaticText(self, label='x:', pos=(10,10))
        wx.StaticText(self, label='y:', pos=(10, 30))
        self.st1 = wx.StaticText(self, label='', pos=(30,10))
        self.st2 = wx.StaticText(self, label='', pos=(30,30))
        self.Bind(wx.EVT_MOVE, self.OnMove)

    def OnMove(self, e):
        x,y = e.GetPosition()
        self.st1.SetLabelText(str(x))
        self.st2.SetLabelText(str(y))


def main():
    app = wx.App()
    frame = Example(None, title='move')
    frame.Show()
    app.MainLoop()

if __name__ == '__main__':
    main()
